package org.study.hadoop.md.entity;

/**
 * 用户
 */
public class User {
	private int id;					// 用户编号
	private int reputation;			// 声望
	private String creationDate;		// 创建时间
	private String lastAccessDate;		// 最后访问时间
	private String displayName;			// 名称
	private String emailHash;			// 邮箱
	private String location;			// 地区
	private int age;					// 年龄
	private int views;					// 浏览次数
	private int upVotes;				// 赞同投票
	private int downVotes;				// 不赞同投票
	
	public User(int id, int reputation, String creationDate, String lastAccessDate,
			String displayName, String emailHash, String location, int age,
			int views, int upVotes, int downVotes) {
		this.id = id;
		this.reputation = reputation;
		this.creationDate = creationDate;
		this.lastAccessDate = lastAccessDate;
		this.displayName = displayName;
		this.emailHash = emailHash;
		this.location = location;
		this.age = age;
		this.views = views;
		this.upVotes = upVotes;
		this.downVotes = downVotes;
	}
	
	public int getId() {
		return id;
	}
	public void setId(int id) {
		this.id = id;
	}
	public int getReputation() {
		return reputation;
	}
	public void setReputation(int reputation) {
		this.reputation = reputation;
	}
	public String getCreationDate() {
		return creationDate;
	}
	public void setCreationDate(String creationDate) {
		this.creationDate = creationDate;
	}
	public String getLastAccessDate() {
		return lastAccessDate;
	}
	public void setLastAccessDate(String lastAccessDate) {
		this.lastAccessDate = lastAccessDate;
	}
	public String getDisplayName() {
		return displayName;
	}
	public void setDisplayName(String displayName) {
		this.displayName = displayName;
	}
	public String getEmailHash() {
		return emailHash;
	}
	public void setEmailHash(String emailHash) {
		this.emailHash = emailHash;
	}
	public String getLocation() {
		return location;
	}
	public void setLocation(String location) {
		this.location = location;
	}
	public int getAge() {
		return age;
	}
	public void setAge(int age) {
		this.age = age;
	}
	public int getViews() {
		return views;
	}
	public void setViews(int views) {
		this.views = views;
	}
	public int getUpVotes() {
		return upVotes;
	}
	public void setUpVotes(int upVotes) {
		this.upVotes = upVotes;
	}
	public int getDownVotes() {
		return downVotes;
	}
	public void setDownVotes(int downVotes) {
		this.downVotes = downVotes;
	}
	@Override
	public String toString() {
		return "<row\tId=" + id + "\tReputation=" + reputation
				+ "\tCreationDate=" + creationDate + "\tLastAccessDate="
				+ lastAccessDate + "\tDisplayName=" + displayName
				+ "\tEmailHash=" + emailHash + "\tLocation=" + location
				+ "\tAge=" + age + "\tViews=" + views + "\tUpVotes=" + upVotes
				+ "\tDownVotes=" + downVotes + "/>";
		
//		return "<row Id=\"" + id + "\" Reputation=\"" + reputation
//				+ "\" CreationDate=\"" + creationDate + "\" LastAccessDate=\""
//				+ lastAccessDate + "\" DisplayName=\"" + displayName
//				+ "\" EmailHash=\"" + emailHash + "\" Location=\"" + location
//				+ "\" Age=\"" + age + "\" Views=\"" + views + "\" UpVotes=\"" + upVotes
//				+ "\" DownVotes=\"" + downVotes + "\" />";
	}
}
